using System;
using System.Collections.Generic;
using System.Text;

namespace Zsa.Emulation.Games
{
    public class NesGame //: IList<NesGameCart>
    {

        #region Fields
        /// <summary>
        /// A unique internal id used to identify games.
        /// New games are assigned new ids and game id are persisted.
        /// </summary>
        private readonly int _GameId;
        /// <summary>
        /// The name of the game.
        /// </summary>
        private string _GameName;
        /// <summary>
        /// The cartridges associated with the game.
        /// </summary>
        private IList<NesGameCart> _Carts;
        #endregion Fields


        /// <summary>
        /// Gets the other titles.
        /// </summary>
        /// <value>The other titles.</value>
        public string[] OtherTitles
        {
            get
            {
                List<string> _Titles = new List<string>();
                string _CartName = null;
                for (int _CartIndex = 0; _CartIndex < _Carts.Count; _CartIndex++)
                {
                    _CartName = _Carts[_CartIndex].CartName;
                    if (_CartName == _GameName ||  _Titles.Contains(_CartName))
                    {
                        continue;
                    }
                    _Titles.Add(_Carts[_CartIndex].CartName);
                }
                return _Titles.ToArray();
            }
        }



        }
}
